package spring01;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import spring01.entity.BClass;
import spring01.entity.School;
import spring01.entity.Student;

public class Demo01 {

    public static void main(String[] args) {

        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");

        Student student01 = (Student) context.getBean("student01");
        System.out.println(student01.toString());

        BClass bclass = (BClass) context.getBean("bclass");
        System.out.println(bclass);

        School school = context.getBean(School.class);
        System.out.println(school);
    }
}
